
<template>
  <div class="no-permission-container">
    <div class="oa-content">
      <div class="permission-card">
        <div class="illustration">
          <svg width="200" height="200" viewBox="0 0 24 24">
            <path
              fill="#f56c6c"
              d="M12,1L3,5v6c0,5.55 3.84,10.74 9,12c5.16-1.26 9-6.45 9-12V5L12,1z M12,11.99h7c-0.53,4.12-3.28,7.79-7,8.94V12H5V6.3l7-3.11V11.99z"
            />
            <circle fill="#f56c6c" cx="12" cy="12" r="3.5" />
          </svg>
        </div>
        <h2>403 Forbidden</h2>
        <p>抱歉，您没有权限访问此页面</p>
        <div class="actions">
          <el-button type="primary" @click="goBack">返回上一页</el-button>
          <el-button @click="goHome">返回首页</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goBack = () => {
  router.go(-1)
}

const goHome = () => {
  router.push('/')
}
</script>

<style scoped>
.no-permission-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f7fa;
}

.oa-header {
  height: 60px;
  background: #409eff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}

.logo {
  font-size: 20px;
  font-weight: bold;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.username {
  font-size: 16px;
}

.oa-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.permission-card {
  background: white;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
}

.permission-card h2 {
  color: #f56c6c;
  margin: 20px 0 10px;
  font-size: 28px;
}

.permission-card p {
  color: #606266;
  margin-bottom: 30px;
  font-size: 16px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.illustration {
  margin-bottom: 20px;
}
</style>
